import { AcceptType } from "@/stores/low-editor-comps-conf";
export const accept: AcceptType<"body"|"buttonGroup"> = {
  body:["TableColumn", "TableOperationColumn"],
  buttonGroup: ["Button"]
}

export const setter = [
  {
    key: "basicProps",
    label: "基本属性",
    children: [
      {
        name: "primaryKey",
        label: "主键",
        type: "input",
      },
      {
        name: "api",
        label: "接口",
        type: "apiSelector",
      },
      {
        name: "size",
        label: "表格大小",
        type: "radio",
        defaultValue: "middle",
        options: [
          { label: "大", value: "large" },
          { label: "中", value: "middle" },
          { label: "小", value: "small" },
        ],
      },
      {
        name: "pagination",
        label: "分页器",
        type: "tablePaginationSelector",
      },
    ],
  },
  {
    key: "headerTool",
    label: "头部工具栏",
    children: [
      {
        name: "showHeaderTool",
        label: "头部工具栏",
        type: "switch",
      },
      {
        name: "showSearch",
        label: "简单查询",
        type: "switch",
      },
      {
        name: "filterFields",
        label: "查询字段",
        // type: "apiFieldSelector",
        type: "tableColumnSelector",
        props:{
          mode: "multiple"
        }
      },
      {
        name: "showFresh",
        label: "刷新",
        type: "switch",
      },
    ]
  }
];

export const methods = [
  {
    name: "getTableData",
    label: "请求数据",
  },
  {
    name: "refresh",
    label: "刷新数据",
  },
];

